package com.bugreport;

import static org.junit.Assert.assertNotNull;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.unitils.UnitilsJUnit4;
import org.unitils.spring.annotation.SpringApplicationContext;

import com.bugreport.web.ReportIssueController;

@SpringApplicationContext("spring-bug-report.xml")
public class BugTrackerApplicationLoading extends UnitilsJUnit4 {

	@SpringApplicationContext
	private ApplicationContext context;

	@Test
	public void verifyApplicationLoading() {

		ReportIssueController reporter = (ReportIssueController) context.getBeansOfType(ReportIssueController.class)
				.values().iterator().next();
		assertNotNull(reporter);
	}
}
